
Component({
    properties:{
        scrollHeight: {
            type: Number,
            value: 0
        }
    },
    data:{
        show: false,
    },

    observers:{
        scrollHeight: function(value){
            if(value > (wx.getSystemInfoSync().windowHeight * 0.5)){
                this.setData({show: true}); return;
            }
            this.setData({show:false});
        }
    },

    methods: {
        toTop(){
            wx.pageScrollTo({
                scrollTop: 0,
                duration: 500
            })
        }
    }

})